package com.wdf.project02.Controller;

import com.wdf.project02.Service.UserService;
import com.wdf.project02.pojo.Result;
import com.wdf.project02.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    @Autowired
    UserService userService;
    @RequestMapping("/listUser")
    private Result listUser(){
        List<User> listUser = userService.list();
        return Result.success(listUser);
    }
}
